'use strict'
import { Button, View } from '../../component/index'
import globalStyle from '../css.css'
import style from './css.css'
import Descriptor from '../descriptor'

class Buttondemo extends React.Component {
  _handleButtonTap () {
    window.Qapp.showToast({
      content: '这是内容这是内容这是容这是内容这是内容',
      theme: 0,
      time: 1000
    })
  }
  render () {
    return (
      <View className={globalStyle.example}>
        <Button
          tap={this._handleButtonTap}
          className={style.button}
          tapClassName={style.buttonTap}>
        按钮
        </Button>
        <Descriptor
          title="基础按钮"
        >
        通过`tapClassName`属性定制按钮的点击时的状态。
        </Descriptor>
      </View>
    )
  }
}
export default Buttondemo
